import React from 'react';
import {View, Text} from 'react-native';
import {Dimensions} from 'react-native';
import {getChannel} from '@/api/index';

const screenHeight = Dimensions.get('screen').height;
const windowHeight = Dimensions.get('window').height;
const navbarHeight = screenHeight - windowHeight;
console.log(screenHeight, windowHeight, navbarHeight);
class Album extends React.Component {
  state = {
    channel: {},
  };
  async getChannel() {
    const res = await getChannel();
    this.setState({
      channel: res.data,
    });
  }
  componentDidMount(): void {
    this.getChannel();
  }
  render(): React.ReactNode {
    const {channel} = this.state;
    console.log(channel);
    return (
      <View
        style={{
          paddingTop: navbarHeight,
        }}>
        <Text>频道</Text>
      </View>
    );
  }
}

export default Album;
